home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Miscellaneous / Randy Thelen / ThreadedSort / AOCE Stuff / MailerWindow.cp next >
Encoding:
Text File  |  1994-06-26  |  1007 b   |  54 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        MailerWindow.cp
  3.  
  4.     Contains:    A AOCE-aware window base class
  5.                 
  6.     Written by: Dave Falkenburg
  7.     
  8.     Copyright:    © 1993-94 by Dave Falkenburg, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.     
  12.     To Do:        Just about everything
  13.     
  14.  */
  15.  
  16. #include <Types.h>
  17. #include <OCEStandardMail.h>
  18.  
  19. #include "AppLib.h"
  20. #include "MailerWindow.h"
  21.  
  22. #define    kCanContract            true
  23. #define    kInitiallyExpanded        true
  24. #define    kDefaultAuthIdentity    ((AuthIdentity) 0)
  25.  
  26.  
  27. TMailerWindow::TMailerWindow()
  28.     {
  29.     CreateWindow(kNormalWindow);
  30.     }
  31.  
  32. TMailerWindow::~TMailerWindow()
  33.     {
  34.     }
  35.  
  36. WindowPtr
  37. TMailerWindow::MakeNewWindow(WindowPtr behindWindow)
  38.     {
  39.     WindowPtr    aWindow;
  40.     Point        where = {0,0};
  41.     
  42.     if (gHasColorQuickdraw)
  43.         aWindow = GetNewCWindow(128,nil,behindWindow);
  44.     else
  45.         aWindow = GetNewWindow(128,nil,behindWindow);
  46.         
  47.     if ((aWindow != nil) && (SMPNewMailer(aWindow, where, kCanContract, kInitiallyExpanded, kDefaultAuthIdentity, nil, 0L) == noErr))
  48.         return aWindow;
  49.  
  50.     DisposeWindow(aWindow);
  51.     return (WindowPtr) nil;
  52.     }
  53.  
  54.